Xbasic

SQL::ResultSetDataAsGeography Method

Syntax

result = DataAsGeography(Column as N | Column as C [,SRID as N])

Arguments

ColumnNumeric Character

The column index or column name.

SRIDNumeric

The spatial reference identifier type.

Returns

resultMicrosoft::SQLServer::Types::SQLGeography

Returns a Microsoft::SQLServer::Types::SQLGeography object populated with the data from the database.

Description

Takes data retrieved from a database and returns a .NET Geography object.

Discussion

Get the data for the column name or index specified as a Geography object. SQL::ResultSet::DataAsGeography(), will return a Microsoft::SQLServer::Types::SQLGeography object instantiated from the data retrieved from your database. The object is instantiated regardless of the database from which the data was retrieved.

This function works with GeogAsText() and GeogAsBinary(). For PostgreSQL, MySQL and SQL Server you can select the column directly without using the portable SQL function. In some cases, the database does not return enough information to instantiate the object properly unless you wrap the column with either GeogAsText() or GeogAsBinary().